package com.ea.modular.service.sys;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ea.common.node.ZTreeNode;
import com.ea.common.parent.service.CrudService;
import com.ea.modular.dao.sys.OfficeDao;
import com.ea.modular.model.sys.Office;
/**
 * 机构实现类
 * @author jun
 *
 */
@Service
public class OfficeService extends CrudService<OfficeDao,Office>{

	@Autowired
	private OfficeDao dao;
	
	/**
     * 获取ztree的节点列表
     *
     * @return
     */
	@Transactional(readOnly=true)
	public List<ZTreeNode> tree(){
		return dao.tree();
	}
	
	/**
     * 获取外部使用ztree的节点列表
     *
     * @return
     */
	@Transactional(readOnly=true)
	public List<ZTreeNode> outTree(){
		return dao.outtree();
	}
	
}
